package com.qh.yyxt.pojo;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.qh.yyxt.pojo.entity.thing.Thing;
import com.qh.yyxt.pojo.entity.thing.ThingSize;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@AllArgsConstructor
@NoArgsConstructor
@Data
public class ThingSizeDTO
{
    @JsonProperty("id")
    private Integer id;
    //对应物品的id
    @JsonProperty("tid")
    private Integer tid;
    //规格
    @JsonProperty("size")
    private String size;
    @JsonProperty("unit")
    private String unit;
    @JsonProperty("name")
    private String name;
    @JsonProperty("num")
    private Integer num;
    @JsonProperty("renum")
    private Integer renum;
    @JsonProperty("addNum")
    private Integer addNum;
    public void setThingSize(Thing thing, ThingSize thingSize)
    {
        this.setId(thingSize.getId());
        this.setTid(thing.getId());
        this.setName(thing.getName());
        this.setSize(thingSize.getSize());
        this.setNum(thingSize.getNum());
        this.setUnit(thing.getUnit());
    }
}
